package com.atwisdom.star.core.bsl.functionClass.impl;

import com.atwisdom.star.core.bsl.functionClass.BatchNumberBslService;
import com.atwisdom.star.core.dsl.functionClass.Impl.BatchNumberDslServiceImpl;
import com.atwisdom.star.exception.pojo.BusinessException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
* @author fushb
* @description 针对表【batch_number】的数据库操作Service实现
* @createDate 2023-02-14 00:51:14
*/
@Service
public class BatchNumberBslServiceImpl implements BatchNumberBslService {
    @Autowired
    private BatchNumberDslServiceImpl batchNumberService;

    /**
     * 获取批次号当前值
     *
     * @param param 参数据
     * @return 返回值
     */
    @Override
    public String getCurrentVal(Map<String, String> param) {
        return batchNumberService.getCurrentVal(param);
    }

    @Override
    public String getCurrentValByCode(String code) throws BusinessException {
        return batchNumberService.getCurrentValByCode(code);
    }


    /**
     * 获取下一个批号值
     *
     * @param param 参数
     * @return 返回值
     */
    @Override
    public String getNextVal(Map<String, String> param) {
       return batchNumberService.getNextVal(param);
    }

    @Override
    public String getNextValByCode(String code) throws BusinessException {
        return batchNumberService.getNextValByCode(code);
    }
}




